
from core.lib import ImageDefault
from factory import db
from models import BaseModel


class PersonalInformation(BaseModel):
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    intro = db.Column(db.String(120), default='该用户暂无介绍')
    uid = db.Column(db.Integer, nullable=False)
    role = db.Column(db.String(50), default='访客')
    img_icon = db.Column(db.Text, default=lambda: ImageDefault())
    img_background = db.Column(db.Text, default=lambda: ImageDefault())

class PersonalIdentity(BaseModel):
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    uid = db.Column(db.Integer, nullable=False)
    role = db.Column(db.String(50), default='访客')
    image = db.Column(db.Text, default=lambda: ImageDefault())
    published = db.Column(db.Boolean, default=False)
    checked = db.Column(db.Boolean, default=False)
    passed = db.Column(db.Boolean, default=False)
    reason = db.Column(db.String(300), default='')

